<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<head>
	<sx:head extraLocales="en-us,nl-nl,de-de" />
</head>
<s:form action="invoices.htm" method="post" theme="simple">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td>
				<div class="blue-text16" style="margin: 0px 0px 0px 0px">
					<s:text name="invoicesoverview.para1" />
				</div>
				<div class="header-separator-bg" style="margin: 10px 5px 17px 0px"></div>
				<div style="margin: 0px 0px 12px 0px">
					<table bgcolor="#ffffff" cellpadding="4" cellspacing="0"
						width="100%">
						<tbody>
							<tr>
								<td colspan="2" align="left" valign="middle" class="common-text">
									<s:text name="invoicesoverview.para2" />
								</td>
							</tr>
							<tr>
								<td colspan="2" class="common-text">
									<b><s:text name="invoicesoverview.From" /> </b>
									<sx:datetimepicker toggleType="wipe" toggleDuration="200"
										type="date" name="fromDate" value="%{fromDate}"
										displayFormat="dd/MM/yyyy" cssClass="search-textmenu" />
									<b><s:text name="invoicesoverview.To"></s:text> </b>
									<sx:datetimepicker toggleType="wipe" toggleDuration="200"
										type="date" name="toDate" value="%{toDate}"
										displayFormat="dd/MM/yyyy" cssClass="search-textmenu" />
									&nbsp;&nbsp;
									<s:text name="invoicesoverview.ddmmyyyy"></s:text>
									<table border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td class="btn-grey-left1"></td>
											<td class="btn-grey-middle1 ">
												<s:submit value="Smart Search" theme="simple"
													cssClass="submit-btn-common" />
											</td>
											<td class="btn-grey-right1"></td>
										</tr>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
					<display:table name="invoicesList" pagesize="10" cellpadding="6"
						style="width: 100%;" cellspacing="1"
						requestURI="transactionNotYetInvoiced.htm" id="row"
						class="common-text">
						<display:column titleKey="invoicesoverview.Nr" title="Nr."
							headerClass="grid-header-bg grid-header-text"
							class="grid-bg common-text">
							<c:out value="${row_rowNum}" />
						</display:column>
						<display:column titleKey="invoicesoverview.InvoiceNr" autolink="true" href="viewInvoiceDetails.htm" paramId="invoice" paramProperty="invoice"
							title="Invoice Nr." headerClass="grid-header-bg grid-header-text"
							class="grid-bg common-text" property="invoice" />
						<display:column titleKey="invoicesoverview.Date" title="Date"
							headerClass="grid-header-bg grid-header-text"
							class="grid-bg common-text" >
								<s:date name="#attr.row.start" format="dd MMMM, yyyy"/>
							</display:column>
						<display:column titleKey="invoicesoverview.Amount" title="amount"
							headerClass="grid-header-bg grid-header-text" property="amount"
							class="grid-bg common-text" />
						<display:column titleKey="invoicesoverview.VAT" title="VAT"
							headerClass="grid-header-bg grid-header-text" property="vat"
							class="grid-bg common-text" />
						<display:column titleKey="invoicesoverview.TotalAmount"
							title="Total Amount"
							headerClass="grid-header-bg grid-header-text"
							class="grid-bg common-text">
							<s:set name="total" value="%{#attr.row.amount-#attr.row.due}"></s:set>
							<s:property value="#total" />
						</display:column>
						<display:column titleKey="invoicesoverview.Balance"
							title="Balance" headerClass="grid-header-bg grid-header-text"
							property="balance" class="grid-bg common-text" />
						<display:column title="Action" value="Delete" autolink="true" href="deleteInvoice.htm" paramId="invoice" paramProperty="invoice"
							headerClass="grid-header-bg grid-header-text"
							class="grid-bg common-text" />
					</display:table>
				</div>
			</td>
		</tr>
	</table>
</s:form>